Skip to content

feat(copilot): add a docs-backed platform agent - #5948

Closed
j15z wants to merge 30 commits into
feat/accessible-workspaces-contextfrom
feat/enhance-search-agent
Closed

feat(copilot): add a docs-backed platform agent#5948
j15z wants to merge 30 commits into
feat/accessible-workspaces-contextfrom
feat/enhance-search-agent

Conversation

@j15z

@j15z j15z commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Copilot can now delegate Sim product questions to a dedicated platform agent. Documented behavior is grounded in Sim's public docs, while workspace-access questions can use the live list_user_workspaces tool supplied by the focused dependency in #6227.

  • Docs corpus (docs/): a generated manifest synced from apps/docs/content/docs/en defines a read-only VFS tree. glob lists it, read fetches pages from docs.sim.ai, and single-page grep searches within a page. Academy and API-reference remain deliberately unmounted.
  • search_docs server tool replaces search_documentation: vector search supports optional page/section path scoping and bounded topK, and reports filtered-result shortfalls explicitly.
  • Platform agent surface: the generated catalog and Copilot UI recognize the platform subagent, while retired search_documentation and get_platform_actions ids stay permanently chip-hidden for historical chat replay.
  • Hardening: trailing-slash docs globs resolve consistently, oversized single-line pages fail with grep guidance, and handler tests cover docs routing, errors, truncation, and dispatch.
  • @Docs tagging remains inert: the wire context kind stays as a documented future seam, but the server continues to drop it; the platform agent uses the docs VFS and search_docs instead.

Depends on #6227 for the updated list_user_workspaces result. The companion Mothership agent consumes that result in simstudioai/mothership#371, which in turn depends on simstudioai/mothership#393.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • bun --cwd apps/sim test lib/copilot/tools/handlers/workflow/queries.test.ts lib/copilot/tools/tool-display.test.ts — 74 tests passed across this branch and its focused dependency.
  • bun run check:api-validation passed.
  • bunx biome check passed for the changed Sim files.
  • bun run scripts/sync-tool-catalog.ts --check --input=../mothership/copilot/contracts/tool-catalog-v1.json passed.
  • The existing manifest, docs search, VFS routing, truncation, and dispatch tests continue to cover the documentation path; docs-manifest:check prevents manifest drift in CI.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

UI impact is chip text only: docs reads render as Section/page (for example, "Read Workflows/agent") and docs searches as "Searching Sim docs for "..."".

Related: simstudioai/mothership#371

Post-Deploy Monitoring & Validation

Merge and deploy #6227 and simstudioai/mothership#393 before the platform-agent PRs. For the first 24 hours after both platform PRs deploy, the Copilot/platform owner should watch request logs for platform, list_user_workspaces, tool-not-found or denied failures, and repeated delegation. Healthy behavior is a direct workspace-list call for access and role questions, exactly one current workspace in scoped chats, and docs-backed answers for product behavior. Removing the platform allowlist entry in the companion PR disables the live lookup independently.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

requires-mothership-merge Has a companion PR on the mothership/copilot side — merge in lockstep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant